package com.eva.job;

import com.eva.core.job.BaseJob;
import com.eva.core.job.JobContext;
import com.eva.core.job.JobParam;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;

@Slf4j
@Component("testJob")
public class TestJob extends BaseJob {

    @Override
    public JobContext execute(JobParam param) {
        log.info("=====TestJob execute");
        JobContext jobContext = new JobContext();
        try {
            jobContext.setContext("暂停11000毫秒");
            Thread.sleep(11000);
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
        return jobContext;
    }
}
